var a = 1;

function Add(left: number, right: number): number {
  return left + right;
}

var num = Add(1, 2);
console.log(num)


// interface Shape {
//   name: string;
//   width: number;
//   height: number;
//   color?: string;
// }

// function Ssc(shape: Shape) {
//   var area = shape.width * shape.height;
//   return "I'm a " + shape.name + "with area of " + area + "cm squared";
// }

// console.log(Ssc({name: 'rectAngle', width: 10, height: 20}))
// console.log(Ssc({name: 'square', width: 20, height: 20, color: 'blue'}))


class Shape {
 
    area: number;
    private color: string;
    public abc: string;
    constructor ( public name: string, width: number, height: number ) {
        this.area = width * height;
        this.color = "pink";
        this.abc = 'abc'
    };
 
    shoutout() {
        return "I'm " + this.color + " " + this.name +  " with an area of " + this.area + " cm squared.";
    }
}

var square = new Shape("square", 30, 30);
 
console.log( square.shoutout() );
// console.log( 'Area of Shape: ' + square.area );
// console.log( 'Name of Shape: ' + square.name );
// console.log( 'Color of Shape: ' + square.color );
 

class Shape3D extends Shape {
  valume: number;

  constructor(public name: string, width: number, height: number, length: number) {
    super(name, width, height);
    this.valume = this.area * length;
  }

  shoutout() {
    return "I'm " + this.name +  " with an area of " + this.valume + " cm cube.";
  }

  superShout() {
    return super.shoutout();
  }
}

 
var cube = new Shape3D("cube", 30, 30, 30);
console.log( cube.shoutout() );
console.log( cube.superShout() );